import { View } from 'react-native';
import React from 'react';

import * as Animatable from 'react-native-animatable';
import { styles } from './MyStyle';

// 定义基本组件
const View01 = () => {
  return (
    <View style={styles.box1}>
      <View style={styles.innerBox} />
    </View>
  );
};

// https://github.com/oblador/react-native-animatable


// 主组件实现
export const Test2001 = () => {
  return (
    <View style={styles.container}>
      <Animatable.View
        animation={{
          from: { transform: [{ rotate: '0deg' }] },
          to: { transform: [{ rotate: '360deg' }] },
        }}
        duration={4000}
        iterationCount="infinite"
        easing="linear"
        style={styles.box1}
      >
        <View01 />
      </Animatable.View>
    </View>
  );
};
